<%@page import="Model.User.UserSupplierPurchaseView"%>
<%@page import="Model.Purchase.PurchaseOfferList"%>
<%@page import="Model.Purchase.PurchaseList"%>
<%@page import="Model.consultation.consultationList"%>
<%@page import="Model.My.DynamicList"%>
<%@page import="Model.Supplier.UserSupplierPurchase"%>
<%@page import="RssEasy.Core.CookieHelper"%>
<%@page import="Model.Product.ProductRecomnendView"%>
<%@page import="Model.Product.ProductList"%>
<%@page import="RssEasy.DAL.Pagination"%>
<%@page import="Model.Purchase.PurchaseListView"%>
<%@page import="Model.User.UserList"%>
<%@page import="Model.Supplier.SupplierList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    UserSupplierPurchase usp = new UserSupplierPurchase(pageContext);
    UserList us = new UserList(pageContext);
    SupplierList sup = new SupplierList(pageContext);
    us.request();
    usp.request();
    sup.request();
    us.select().where("myid=?", usp.get("myid")).get_first_rows();
    sup.select().where("myid=?", usp.get("myid")).get_first_rows();
    usp.select().where("myid=?", usp.get("myid")).get_first_rows();
    ProductRecomnendView prov = new ProductRecomnendView(pageContext);
    prov.pagesize = 6;
    prov.select("myid,name,pt,productid").where("myid=?", usp.get("myid")).get_page_desc("myid");
    ProductList pro = new ProductList(pageContext);
    pro.pagesize = 9;
    pro.select("id,name,pt").where("myid=?", usp.get("myid")).get_page_desc("id");
    DynamicList dl = new DynamicList(pageContext);
    dl.select().where("myid=?", usp.get("myid")).get_page_desc("id");
    consultationList zs = new consultationList(pageContext);
    zs.select("myid,certimg").where("myid=?", usp.get("myid")).query();
    UserSupplierPurchaseView uspv = new UserSupplierPurchaseView(pageContext);
    uspv.request();
   // uspv.select("num,aggregate").where("myid=?", uspv.get("myid")).get_first_rows();
   // uspv.select("aggregate").where("myid=?", uspv.get("myid")).get_first_rows();
    //double w = 0;
    //w = Double.parseDouble(uspv.get("aggregate")) / 10000.0;


%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>企企通-供应商详情</title>
        <meta name="description" content="这里写网站内容描述" />
        <meta name="keywords" content="这里写关键词" />
        <meta name="Robots" contect="all">
        <link href="/css/reset.css" rel="stylesheet" type="text/css"/>
        <link href="/inc/footer.css" rel="stylesheet" type="text/css"/>
        <link href="/supplier/css/home.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div id="top">
            <div>
                <a href="/index.jsp">企企通官网首页</a>            
                <a href="/login/login.jsp">登陆</a>
                <a id="act" href="/my/Index" ></a> 
                <i></i>
                <a href="/login/register.jsp">注册</a>
                <span>客服热线:400-835-1881</span>
            </div>
        </div>
        <div id="poster">
            <img src="/upfile/<%=sup.get("mybackground")%>" />
        </div>
        <div id="navi">
            <ul>
                <li class="selected">首页</li>
                <li>供应产品</li>
                <li>公司简介</li>
                <li>企业动态</li>
                <li>资质展示</li>
                <li>联系我们</li>
            </ul>
        </div>
        <div id="main">
            <ol>
                <li class="show">
                    <div id="introduce">
                        <h3>公司介绍</h3>
                        <img src="/upfile/<%=sup.get("myintroduce")%>"/>
                        <p><%=sup.get("enterprisejs")%></p>
                        <span>查看更多详情&gt;</span>
                    </div>
                    <div id="recommend">
                        <h3>产品推荐<span>更多&gt;&gt;</span></h3>
                        <% while (prov.for_in_rows()) {%>
                        <div title="<%prov.write("name");%>" productid="<%=prov.get("productid")%>">
                            <img src="/upfile/<%prov.write("pt");%>"/>
                            <p><%prov.write("name");%></p>
                        </div>
                        <%}%>
                    </div>
                </li>
                <li>
                    <div id="product">
                        <h3>供应产品</h3>
                        <% while (pro.for_in_rows()) {%>
                        <div title="<%pro.write("name");%>" productid="<%=pro.get("id")%>">
                            <img src="/upfile/<%pro.write("pt");%>"/>
                            <p><%pro.write("name");%></p>
                        </div>
                        <% }%>
                    </div>
                    <div class="page" id="paging">
                        <span class="first">首页</span>
                        <span class="up">上一页</span>
                        <span><em>1</em>/<%=pro.totalpage%></span>
                        <span class="down">下一页</span>
                        <span class="last" totalPage="<%=pro.totalpage%>">尾页</span>
                        <span>跳转至</span>
                        <input type="text" value="1">
                        <span class="jump">确定</span>
                    </div>
                    <div id="details"></div>
                </li>
                <li>
                    <div id="present">
                        <h3>公司介绍</h3>
                        <img src="/upfile/<%=sup.get("myintroduce")%>"/>
                        <p><%=sup.get("enterprisejs")%></p>
                    </div>
                    <div id="detail">
                        <h3>详情信息</h3>
                        <table>
                            <tr>
                                <td>企业名称：</td>
                                <td><%=us.get("corpname")%></td>
                                <td class="title">英文名称：</td>
                                <td><%sup.write("englishname");%></td>
                            </tr>
                            <!--                            <tr>
                                                            <td>注册类型：</td>
                                                            <td></td>
                                                            <td class="title">经营模式：</td>
                                                            <td></td>
                                                        </tr>-->
                            <tr>
                                <td>注册资本：</td>
                                <td><%sup.write("yong");%>万</td>
                                <td class="title">法人代表：</td>
                                <td><%sup.write("legal");%></td>
                            </tr>
                            <tr>
                                <td>联系人：</td>
                                <td><%us.write("linkname");%></td>
                                <td class="title">联系电话：</td>
                                <td><%us.write("zuoji");%></td>
                            </tr>
                            <tr>
                                <td>主营品类：</td>
                                <td colspan="3"><%us.write("mainproducts");%></td>
                            </tr>
                            <tr>
                                <td>公司地址：</td>
                                <td><%us.write("fulladress");%></td>
                                <td class="title">公司网站：</td>
                                <td><%=sup.get("enterpriseurl")%></td> 
                            </tr>
                        </table>
                    </div>
                </li>
                <li>
                    <div id="dynamic">
                        <h3>动态资讯</h3>
                        <table>
                            <thead>
                                <tr>
                                    <td>标题</td>
                                    <td>日期</td>
                                </tr>
                            </thead>
                            <tbody id="content">
                                <% while (dl.for_in_rows()) {%>
                                <tr articleid="<%=dl.get("id")%>">
                                    <td  class="target" title="<%dl.write("title");%>"><%dl.write("title");%></td>
                                    <td rssdate="<%dl.write("shijian");%>,yyyy-MM-dd"></td>
                                </tr>
                                <% }%>
                            </tbody>
                        </table>
                    </div>
                    <div class="page" id="pagination">
                        <span class="first">首页</span>
                        <span class="up">上一页</span>
                        <span><em>1</em>/<%=dl.totalpage%></span>
                        <span class="down">下一页</span>
                        <span class="last" totalPage="<%=dl.totalpage%>">尾页</span>
                        <span>跳转至</span>
                        <input type="text" value="1">
                        <span class="jump">确定</span>
                    </div>
                    <div id="article">
                        <h3>动态资讯&gt;资讯详情</h3>
                        <div>

                        </div>
                    </div>
                </li>
                <li class="criterion">
                    <div class="certificate">
                        <h3>供应商证书</h3>
                        <% while (zs.for_in_rows()) {%>
                        <img src="/upfile/<%=zs.get("certimg")%>"/>
                        <% }%>
                    </div>
                </li>
                <li>
                    <div id="contact">
                        <h3>联系我们</h3>
                        <table>
                            <tr>
                                <td>公司：</td>
                                <td><%us.write("corpname");%></td>
                            </tr>
                            <tr>
                                <td>地址：</td>
                                <td><span></span> <%us.write("fulladress");%></td>
                            </tr>
                            <tr>
                                <td>邮编：</td>
                                <td><%us.write("ame");%></td>
                            </tr>
                            <tr>
                                <td>联系人：</td>
                                <td><%us.write("linkname");%></td>
                            </tr>
                            <tr>
                                <td>电话：</td>
                                <td><%us.write("zuoji");%></td>
                            </tr>
                            <tr>
                                <td>手机：</td>
                                <td><%us.write("telphone");%></td>
                            </tr>
                            <tr>
                                <td>传真：</td>
                                <td><%us.write("fax");%></td>
                            </tr>
                            <tr>
                                <td>邮箱：</td>
                                <td><%us.write("email");%></td>
                            </tr>
                        </table>
                    </div>
                </li>
            </ol>
            <div id="info">
                <div id="brief">
                    <h3><%us.write("corpname");%></h3>
<!--                    <p>累计交易项目数量 : <em></em>个</p>
                    <p>累计交易金额 : <b></b>万</p>-->
                    <p>诚信等级 : 
                        <%
                          int grade = Integer.parseInt(sup.get("honesty"));
                            for (int n = 0; n < grade;n++) {%>
                        <i></i>
                        <%}%>
                    </p>
<!--                    <p>所属地区 : <span></span></p>-->
                        <p>公司网址：<%sup.write(
                                "enterpriseurl");%></p>
                        <p>公司地址: <span></span> <%us.write(
                                "fulladress");%></p>
                    <span>查看联系方式&gt;</span>
                </div>
                <div id="trend">
                    <h3>企业动态</h3> 
                </div>
            </div>
        </div>
        <%@include file="/inc/footer.jsp" %>
        <%@include file="/inc/js_all.html" %>
        <script src="/js/arealist.js" type="text/javascript"></script>
        <script src="/data/dictdata.js" type="text/javascript"></script>
        <script type="text/javascript">
            dictdata['area'] = AreaListData;
        </script>
        <script type="text/javascript" src="/supplier/js/home.js"></script>
    </body>
</html>
